package homework;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriteStringDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("Butterfly.txt");
        fos.write("好想化做一只蝴蝶,乘着微风振翅高飞。".getBytes(StandardCharsets.UTF_8));
        fos.write("现在马上,只想赶快和你见面。".getBytes(StandardCharsets.UTF_8));
        System.out.println("写入完成");
        fos.close();
    }
}
